package cn.gailvlun.gll.net.hotel;

import android.databinding.ObservableInt;

import com.google.gson.annotations.Expose;

import java.util.Date;

import cn.gailvlun.gll.net.base.Profile;
import cn.gailvlun.gll.net.emotion.Heart;
import io.realm.RealmObject;
import io.realm.annotations.Ignore;
import io.realm.annotations.PrimaryKey;



public class InsomniaHotel extends RealmObject {
    @PrimaryKey
    private int id;
    private String text;
    private Profile owner;
    @Ignore
    private Heart heart;
    private Date created;
    @Ignore
    private InsomniaCategory category;
    private String title;
    private String audio;
    private Integer audio_length;
    @Ignore
    private InsomniaType type;
    private int comment_num;
    @Ignore
    @Expose(deserialize = false, serialize = false)
    private ObservableInt commentNumObservable;
    private boolean is_subscribe;
    private boolean is_favorite;

    public ObservableInt getCommentNumObservable() {
        if (commentNumObservable == null) {
            commentNumObservable = new ObservableInt(comment_num);
        }
        return commentNumObservable;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Profile getOwner() {
        return owner;
    }

    public void setOwner(Profile owner) {
        this.owner = owner;
    }

    public Heart getHeart() {
        return heart;
    }

    public void setHeart(Heart heart) {
        this.heart = heart;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public InsomniaCategory getCategory() {
        return category;
    }

    public void setCategory(InsomniaCategory category) {
        this.category = category;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAudio() {
        return audio;
    }

    public void setAudio(String audio) {
        this.audio = audio;
    }

    public Integer getAudio_length() {
        return audio_length;
    }

    public void setAudio_length(Integer audio_length) {
        this.audio_length = audio_length;
    }

    public InsomniaType getType() {
        return type;
    }

    public void setType(InsomniaType type) {
        this.type = type;
    }

    public int getComment_num() {
        return comment_num;
    }

    public void setComment_num(int comment_num) {
        this.comment_num = comment_num;
    }

    public boolean isIs_subscribe() {
        return is_subscribe;
    }

    public void setIs_subscribe(boolean is_subscribe) {
        this.is_subscribe = is_subscribe;
    }

    public boolean isIs_favorite() {
        return is_favorite;
    }

    public void setIs_favorite(boolean is_favorite) {
        this.is_favorite = is_favorite;
    }
}
